<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>导航条</title>
    <style>
        a{
            text-decoration: none;
            color: #776b6b;
            font-size: 20px;
            
        }
        a:hover{
            color: white;
            /* 问题：鼠标移入时如何让整个框变色，而不是字体大小的框变色 */
            /* 解决：a标签中设置class */
            background-color: rgb(7, 94, 4);
        }
        .s1{
            height: 50px;
            width: 200px;
            margin-left: 200px;
            background-color: #e8e7e3;
            line-height: 50px;
            text-align: center;
            float: left;
        }
        .s2{
            height: 50px;
            width: 200px;
            background-color: #e8e7e3;
            line-height: 50px;
            text-align: center;
            float: left;
        }
        .s3{
            height: 50px;
            width: 200px;
            background-color: #e8e7e3;
            line-height: 50px;
            text-align: center;
            float: left;
        }
        .s4{
            height: 50px;
            width: 200px;
            background-color: #e8e7e3;
            line-height: 50px;
            text-align: center;
            float: left;
        }
        .s5{
            height: 50px;
            width: 200px;
            background-color: #e8e7e3;
            line-height: 50px;
            text-align: center;
            float: left;
        }
        .s6{
            height: 50px;
            width: 200px;
            background-color: #e8e7e3;
            line-height: 50px;
            text-align: center;
            float: left;
        }
        .s7{
            height: 50px;
            width: 200px;
            background-color: #e8e7e3;
            line-height: 50px;
            text-align: center;
            float: left;
        }
    </style>
</head>
<body>
    <div>
        <a class="s1" href="#">HTML/CSS</a>
    </div>
    <div>
        <a class="s2" href="#">Browser Side</a>
    </div>
    <div>
        <a class="s3" href="#">Server Side</a>
    </div>
    <div>
        <a class="s4" href="#">Programming</a>
    </div>
    <div>
        <a class="s5" href="#">XML</a>
    </div>
    <div>
        <a class="s6" href="#">Web Building</a>
    </div>
    <div>
        <a class="s7" href="#">Reference</a>
    </div>
</body>
</html>